n = 0, num = 4：[]
n = 1, num = 8：[[1, 5], [3, 7]]
n = 2, num = 12：[[1, 8], [2, 7], [4, 11], [5, 10]]
n = 3, num = 16: [[1, 11], [2, 10], [3, 9], [5, 15], [6, 14], [7, 13]]
n = 4, num = 20：[[1, 14], [2, 13], [3, 12], [4, 11], [6, 19], [7, 18], [8, 17], [9, 16]]
n = 5, num = 24：....
正方形每条插入2个点时一共有12个点：
正方形每条插入3个点时一共有16个点：
正方形每条插入4个点时一共有20个点：
正方形每条插入5个点时一共有24个点：...

const n = 1
const num = 4 + 4 * n
let arr = []
for (let index = 0; index < n + 1; index++) {
  let arr2 = []
  for (let index = 1; index < num; index++) {
    arr2.push(index)
    arr2.push(n)
  }
  arr.push(arr2)
}